<@override name="head">
<#include "/inc/include-easyUI-css.html">
</@override>

<@override name="layout_main_content">
<div class="main-content">
	<div class="main-content-inner">
		<div class="breadcrumbs ace-save-state" id="breadcrumbs">
			<ul class="breadcrumb">
				<li><i class="ace-icon fa fa-home home-icon"></i> <a href="javascript:void(0)">首页</a>
				</li>
				<li class="active">账务关系管理</li>
			</ul>
			<!-- /.breadcrumb -->

			<!-- <div class="nav-search" id="nav-search">
				<form class="form-search">
					<span class="input-icon"> <input type="text"
						placeholder="Search ..." class="nav-search-input"
						id="nav-search-input" autocomplete="off" /> <i
						class="ace-icon fa fa-search nav-search-icon"></i>
					</span>
				</form>
			</div> -->
			<!-- /.nav-search -->
		</div>

		<div class="page-content">

			<div class="page-header">
				<h1>
					转账关系表 
					<small> 
						<i class="ace-icon fa fa-angle-double-right"></i> 
					</small>
				</h1>
			</div>
			<!-- /.page-header -->

			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					
					<!-- 搜索form -->
					<form id="searchUserForm" action="" class="form-horizontal" role="form" >
						<div class="space-4"></div>
						<div class="form-group">
							<label class="col-sm-2 control-label no-padding-right" for="search-countDatetime"> 时间 </label>
							<div class="col-sm-9">
								<input type="text" id="search-countDatetime" name="countDatetime" 
									placeholder="时间" class="col-xs-10 col-sm-5" readonly="true"/>
								<div id="getBeginTime"></div>
								
								<div>
			                        <button type="button" id="btn-search" class="btn btn-primary start" style="margin-left: 100px;">
					                    <i></i>
					                    <span>搜索</span>
					                </button>
					                <button type="reset" class="btn btn-warning cancel" style="margin-left: 20px;">
					                    <i></i>
					                    <span>取消</span>
					                </button>
	                           </div>
							</div>
							
						</div>
						<div class="space-4"></div>
					</form>
					<table id="consumeCountList" border="false" width="100%" height="450px"></table>
					
					<!-- PAGE CONTENT ENDS -->
				</div>
				<!-- /.col -->
			</div>
			<!-- /.row -->
		</div>
		<!-- /.page-content -->
	</div>
</div>
<!-- /.main-content -->
</@override>
<@override name="footer">
<#include "/inc/include-easyUI-js.html">
<script type="text/javascript">
jeDate({
	dateCell:"#search-countDatetime",//直接显示日期层的容器，可以是ID  CLASS
	format:"YYYY-MM",//日期格式
	isinitVal:false, //是否初始化时间
	festival:false, //是否显示节日
	isTime:true, //是否开启时间选择
	minDate:"2017-06-01 00:00:00",//最小日期
	maxDate:jeDate.now(0), //设定最大日期为当前日期
});

   var consumeCountGrid;
      $(function () {
       //定义获取数据网格的动态列属性
  		var dataQualityGrid_columns = null;
  		var dataQualityGrid_columns_url = "${pageContext.request.contextPath}/admin/accountingRelations/getDataGridColumns.do";
  		$.ajax({
  			type : "get",
  			url : dataQualityGrid_columns_url,
  			cache : true,
  			async : false,
  			dataType : "json",
  			success : function(data) {
  				if(data != null && data.length > 0 && data[0] != null){
  					data.forEach(function (node) {
  						node.width=200;
  					});
  					dataQualityGrid_columns = [ data ];
  				}
  			}
  		});
  		if(dataQualityGrid_columns != null){
  			consumeCountGrid = $("#consumeCountList").datagrid({
  		 		url: '${pageContext.request.contextPath}/admin/accountingRelations/getList.do',
               rownumbers: true,
               fitColumns:true,
               singleSelect:true,
               idField: 'id',
               loadMsg : "正在加载数据，请等待！",
               onLoadError:function(data){
               },
  				columns :  dataQualityGrid_columns ,
           });
  		}
     });
     
    function reloadDataGrid() {
        consumeCountGrid.datagrid('clearChecked');
        consumeCountGrid.datagrid('reload');
    }

//快速搜索按钮
$('#btn-search').click(function(){
   consumeCountGrid.datagrid('unselectAll');
         	var countDatetime = $('#search-countDatetime').val();
	consumeCountGrid.datagrid('load', {
		countDatetime : countDatetime,
	});
});
</script>
</@override>
<@extends name="/layouts/admin-home.html"/>